<!--页头-->
<ion-header>
    <ion-navbar>
        <ion-title>
            扫描二维码
        </ion-title>
    </ion-navbar>
</ion-header>
<ion-content>
    <ion-card>

        <ion-item class="scannerIcon">
            <ion-icon class="ionIcon" name="qr-scanner" (click)="scanner()"></ion-icon>
        </ion-item>

        <ion-card-content class="cardContent">
            *检查多部电梯时，请提交上一部电梯检查记录后，再扫描下一部电梯的二维码
        </ion-card-content>
    </ion-card>

    <ion-list *ngFor="let info of elevatorIdInfo">
        <ion-item class="activatedColor">
            <ion-label class="eleInfo">电梯信息</ion-label>
        </ion-item>
        <ion-item>
            <ion-label class="info"><img src="assets/icon/maince_dtdm.png">
                <span class="font">设备代码</span>
                <span class="last">{{info.elevatorNum}}</span>
            </ion-label>
        </ion-item>

        <ion-item>
            <ion-label class="info"><img src="assets/icon/maince_dtwz.png">
                <span class="font">电梯位置</span>
                <span class="last">{{info.buildAddr}}</span>
            </ion-label>
        </ion-item>

        <ion-item>
            <ion-label class="info"><img src="assets/icon/maince_dtlx.png">
                <span class="font">电梯类型</span>
                <span class="last">{{info.typeName}}</span>
            </ion-label>
        </ion-item>

        <ion-item>
            <ion-label class="info"><img src="assets/icon/maince_wbdw.png">
                <span class="font">使用单位</span>
                <span class="last">{{info.usedName}}</span>
            </ion-label>
        </ion-item>

        <ion-item>
            <ion-label class="info"><img src="assets/icon/maince_wbdw.png">
                <span class="font">维保单位</span>
                <span class="last">{{info.maintenanceName}}</span>
            </ion-label>
        </ion-item>
    </ion-list>


    <ion-list>
        <ion-card>
            <ion-item class="activatedColor">
                <ion-label class="eleInfo">检查项目</ion-label>
            </ion-item>
        </ion-card>


        <ion-card *ngFor="let obj of itemlist;let i = index">

            <ion-card-content class="checkContent">
                {{obj.checkName}}
            </ion-card-content>

            <ion-card-content class="checkContent">基本要求：{{obj.ext2}}</ion-card-content>

            <ion-item class="activatedItemColor">

                <input class="inputClass" type="radio" name={{i}}  checked="true" [(ngModel)]="obj.isChecked"  value="0" id="{{'baseyes'+i}}" ><label for="{{'baseyes'+i}}">&nbsp;&nbsp;是 &nbsp;&nbsp;</label>

                <input class="inputClass" type="radio" name={{i}}  [(ngModel)]="obj.isChecked"  value="1"  id="{{'baseno'+i}}"><label for="{{'baseno'+i}}">&nbsp;&nbsp;否 &nbsp;&nbsp;</label>

                <input class="inputClass" type="radio" name={{i}}  [(ngModel)]="obj.isChecked"  value="2" id="{{'basenohave'+i}}"><label  for="{{'basenohave'+i}}">&nbsp;&nbsp;无此项 &nbsp;&nbsp;</label>

            </ion-item>

            <div *ngIf="obj.isChecked=='1'">
                <div class="area">
                    <ion-textarea class="placeholderCss" required type="text" placeholder="输入其他要补充的内容" rows="2" [(ngModel)]="obj.remarkes" ></ion-textarea>
                </div>
                <div class="camera">
                    <img src="assets/icon/remark_camera.png" (click)="doCamera(i,'c')">
                    <img *ngFor="let pic of obj.result.picUrl" (click)="onHold(i,pic)" src="{{whaturl(pic)}}" />
                </div>
            </div>
        </ion-card>

    </ion-list>

    <div class="signarea">
        <ion-card>
            <ion-item class="activatedColor">
                <ion-label class="eleInfo">检查结果评价</ion-label>
            </ion-item>
        </ion-card>
        <ion-item>
            <input class="inputClass" type="radio" name={{i}} [(ngModel)]="resultEvaluate"  id="Evaluateyes"  value="0" ><label for="Evaluateyes">&nbsp;&nbsp;优 &nbsp;&nbsp;</label>

            <input class="inputClass" type="radio" name={{i}}  [(ngModel)]="resultEvaluate"   id="Evaluateno" value="1" ><label for="Evaluateno">&nbsp;&nbsp;良 &nbsp;&nbsp;</label>

            <input class="inputClass" type="radio" name={{i}}  [(ngModel)]="resultEvaluate"   id="Evaluatenohave" value="2" ><label for="Evaluatenohave">&nbsp;&nbsp;差 &nbsp;&nbsp;</label>
        </ion-item>
        <ion-textarea class="placeholderCssName" required type="text" [(ngModel)]="opinion"  placeholder="请输入您的意见" rows="5"  ></ion-textarea>
    </div>


</ion-content>
<ion-footer>
    <button style="font-weight: bolder" ion-button block (click)="presentAlert()">完成</button>
</ion-footer>
